A hydrocarbon well generally produces a liquid phase and a gaseous phase, which may include liquid hydrocarbons, gaseous hydrocarbons, water, and sand. In one common arrangement, fluids are produced from the well using a downhole pump to pump the liquid phase and a casing gas pump or compressor to pump the gas phase from the well casing. It will be understood that these are generalized purposes, as the liquid phase may comprise sand and some entrained gas, while the casing gas pump may comprise some liquid or vapour that condenses to liquid and some sand or solids as well and the pumps are designed accordingly.